/*
Copyright (C) 2012 Brady Vidovic

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package xmltvdb.tvdb;

import java.util.Objects;

/**
 *
 * @author bvidovic
 */
public class TVDBSeries {
    
    public String seriesId, seriesName, seriesYear;
    public TVDBSeries(String seriesId)
    {
        this.seriesId = seriesId;
    }
    public TVDBSeries(String seriesid, String seriesName, String seriesYear)
    {
        this.seriesId = seriesid;
        this.seriesName = seriesName;
        this.seriesYear = seriesYear;
    }
 
    //equality basaed on seriesId
    public boolean equals(Object o)
    {
        if(o==null) return false;
        if(!(o instanceof TVDBSeries)) return false;
        TVDBSeries otherSeries = (TVDBSeries)o;
        return (seriesId == null ? otherSeries.seriesId == null : seriesId.equals(otherSeries.seriesId));
    }

    public int hashCode() {
        int hash = 3;
        hash = 97 * hash + Objects.hashCode(this.seriesId);
        return hash;
    }
    
    public String toString(){
        return "tvdbid: "+seriesId+", seriesName: "+seriesName+", seriesYear: " +seriesYear;
    }
}
